top_builddir = ..

include ../config.mk

CPPFLAGS = $(BASECPPFLAGS) $(RUDIMENTSCFLAGS) $(FWPKCFLAGS)

.SUFFIXES: .lo

.cpp.lo:
	$(LTCOMPILE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(COMPILE) $< $(OUT)$@

.cpp.obj:
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(COMPILE) $<

all: fwpk$(EXE)

clean:
	$(LTCLEAN) $(RM) *.lo *.la *.o *.obj *.$(LIBEXT) *.lib *.exp *.idb *.pdb *.manifest fwpk$(EXE)
	$(RMTREE) .libs

fwpk$(EXE): fwpk.cpp fwpk.$(OBJ)
	$(LTLINK) $(LINK) $(OUT)$@ fwpk.$(OBJ) $(LDFLAGS) $(FWPKLIBS) $(RUDIMENTSLIBS)

install:
	$(MKINSTALLDIRS) $(libexecdir)
	$(LTINSTALL) $(CP) fwpk$(EXE) $(bindir)
	$(LTINSTALL) $(CP) fwpk$(EXE) $(bindir)/fwpk.cgi

uninstall:
	$(LTUNINSTALL) $(RM) $(bindir)/fwpk$(EXE)
	$(LTUNINSTALL) $(RM) $(bindir)/fwpk.cgi
